//
//  GYCustomHUD.h
//  GYCustomHUD
//
//  Created by zgy on 2025/5/6.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, GYHUDType) {
    GYHUDTypeLoading,
    GYHUDTypeMessage
};



@interface GYCustomHUD : UIView


+ (instancetype)showHUDWithType:(GYHUDType)type message:(NSString *)message hideAfter:(NSTimeInterval)duration;


+ (void)showLoading;
+ (void)showLoadingWithText:(NSString *)text;

+ (void)hideHUD;

// 如果一个hud消失 马上显示下一个，（通常是多个请求loading），防止闪烁，可以使用此方法延迟0.5s消失
+ (void)hideHUDWithDelay:(NSTimeInterval)duration;



+ (void)showMessage:(NSString *)msg; // 默认2s后消失
+ (void)showMessage:(NSString *)msg hideAfter:(NSTimeInterval)duration;



@end

